home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 3
/
Light ROM 3 - Disc 2.iso
/
programs
/
pc
/
dem2_3ds
/
3
/
dem23ds.doc
next >
Wrap
Text File
|
1995-04-18
|
7KB
|
147 lines
*** DEM to 3DS file converter ***
by Stephane Vilette (04-18-1995)
1.0 Introduction
----------------
Often I've seen people complaining about the fact that they had to use
DXF export/import to use VistaPro's DEM files in 3D Studio because it
takes a lot of time to export big DEM.
So I did it : a DEM to 3DS converter. It can export very large DEM files
in just a few seconds.
This converter is totaly Freeware. You can use it and distribute it as
you like. But if you enjoyed it and found it usefull, leave me a mail
so that I'll know if it's worth making improvements.
1.1 Limitations
---------------
* In VistaPro, you must save DEM file using the "Save DEM Session"
If you just use "Save DEM", some informations will miss in the DEM
file such as Light position, Camera Position and Color Maps.
* The DEM file must be saved with a Polygon Size of 1. If you use
another size, you will probably get strange results.
* Color Maps can not be exported. This will be added in a next release.
(in fact, I don't know if it's really possible. It seems that the only
way to recreate a VistaPro-like texture in 3DS would be to use a IPAS
SXP)
2.0 Syntaxe
-----------
Here is the syntaxe you must use :
DEM23DS -iDEMFile[.DEM] [-o3DSFile[.3DS]] [-mPAthFile[.MPS]]
[-L] [-C] [-Sn] [-Q]
Switches description
--------------------
-i This switch must be followed by the name of the DEM file to be
converted. This switch is optional if a MPS file is specified.
The DEM extension is optional. If not specified, it will be added
at the end of the filename.
-o This switch must be followed by the name of the output 3DS file.
This switch is optional. If not specified, the name of the 3DS
file will be the name of the specified DEM file (switch -i) or
the name of the DEM file included in the MPS file with .3DS
extension. The .3DS extension is optional. If not specified, the
.3DS extension will be added at the end of the filename.
-m This switch must be followed by the name of the MPS file created
with MakePath (Save Session). This switch is optional if a DEM file
is specified. The .MPS extension is optional. If not specified, it
will be added at the end of the filename.
The MPS file contains the DEM filename with which is has been
created. If no DEM file is specified, the programm will search
the DEM filename in the MPS file.
-L This switch tells the converter not to export the Light position.
If not specified, the light position will be exported. If you
have specified a MPS file in the command line, this switch will
be ignored and the light will be exported.
-C This switch tells the converter not to export the Camera. If not
specified, the camera position, target, bank and fov will be
exported. If you have specified a MPS file in the command line,
this switch will be ignored and the camera will be exported.
-Sn This switch determines the quality of the output Landscape in the
3DS file. The 'n' value can be any number between 1 and 8.
1 is the best quality and 8 the worst.
I've created this switch because the exportation of DEM files can
create VERY big 3DS files (a normal DEM file (258x258) creates a
landscape of 132098 faces. The maximal size a DEM files can be is
2050x2050. That would produce a 8405000 faces landscape).
Here is how the 'n' value works : The converter reads 1 point
every 'n' points on the DEM file. That is if you specifie -S3,
a 258x258 DEM file will produce a 86x86 vertices (258/3) landscape.
Even for a final rendering, a quality of 2 is often enough.
If you want a fast preview (for example to place objects on the
scene and have a faster rendering), you can use a n value of 4 or 5.
Values of 6 to 8 gives really bad results but they can be useful
for really large DEM files.
-Pn This switch specifies the number of keys that will be exported from
the MPS file. In a MPS file, a camera position is specified for
every frames in the animation. With this switch, you can tell the
converter to read only every 'n' key in the MPS file. As 3D Studio
can interpolate the camera position between 2 keys, using this
switch, you can create smaller 3DS files. The smallest value for
'n' is 1. The highest is the number of frames in the animation.
-Q Quiet mode. When this switch is specified, the converter doesn't
display all the information messages during the conversion.
3.0 History
-----------
09/19/94 : v0.41ß. First public release on Compuserve and a few BBS of a beta
version. Developped with Borland Pascal 7.01. Many linitations
because of the 64K limit for array sizes.
01/23/94 : v1.00. Because of a hard disk failure, all my sources were lost.
This version was entierely rewritten with Watcom C++ 10.0a.
As it is the first time I'm programming in C, it took me a lot
of time to release this version.
This version can export infinite DEM sizes and you can choose
the quality of the output file.
04/18/95 : v1.20. First public release with camera path exportation.
4.0 Things to do
----------------
* Export textures. I'm not sure if I'll do it because DEM files just contain
the color of faces, not the fractal texture. So the best way to keep a nice
texture, would be to use an IPAS SXP (I don't think that such an IPAS
exists, that's why I've ordered the IPAS developpement kit to create one).
* Any other suggestion I might receive...
5.0 How to contact the author
-----------------------------
If you have problems or suggestion about this converter, you can contact
me on Compuserve of by E-Mail :
Stephane Vilette
E-Mail : vilette@ibm.net
or stephane.vilette@atd.fdn.fr
Compuserve : 100332,3073
BBS (FRANCE) : CAD Connection (33)+1-39.52.98.54 (Sysop : Nenad Boric)
Graphisme.Fr conference.
PCGNet 3D Studio conferences.
UseNet Graphics conferences.
6.0 Thanks
----------
I'd like to thank John Hinkley who made a great job releasing VistaPro and
who gave me many help about the DEM file format and for his improvement
suggestions. (Note: It's no use asking me about the DEM file format. This
format is not released in public domain. If you want more informations about
this format, ask John Hinkley. You can join him on Compuserve in the VRLI
forum).
And I'd also like to thank Rational System Inc. because their DUMP3DS
utility saved me a lot of time to figure out the 3DS file format.